<template>
  <div id="app">
      <router-view/>
  </div>
</template>

<script>
export default {
    mounted() {
        this.getNotice()
    },
    methods: {
        // 获取公告
        getNotice() {
            this.$sendGet('notice')
                .then((res) => {
                    this.$createDialog({
                        type: 'confirm',
                        title: '公告',
                        showClose: true,
                        content: res.data.data,
                        confirmBtn: {
                            text: '确认已读'
                        },
                        cancelBtn: {
                            text: '关闭'
                        },
                        onConfirm: () => {
                            // 已读公告
                            this.$sendPost('notice')
                        }
                    }).show()
                })
        }
    }
}
</script>

<style lang="stylus">
body,html
  height 100%
#app
  font-family Avenir, Helvetica, Arial, sans-serif
  -webkit-font-smoothing antialiased
  -moz-osx-font-smoothing grayscale
  height 100%
  background #f2f2f2
  font-size 14px
</style>
